package p15.p1511;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class p1511 {
    /*    public static void main(String[] args) {
            Student s1 = new Student("1",1);
            Student s2 = new Student("2",2);
            Student s3 = new Student("3",3);
            Student s4 = new Student("4",4);
            Student s5 = new Student("5",5);
            Collection student = new ArrayList();
            //Collection student1 = new Iterator();
            student.add(s1);
            student.add(s2);
            student.add(s3);
            student.add(s4);
            student.add(s5);
            Iterator i = student.iterator();
            while (i.hasNext()) {
                System.out.println(i.next());
                //Student student1 ;
                //new Student();

            }
            }*/
    public static void main(String[] args) {
        Student s1 = new Student("11", 1);
        Student s2 = new Student("22", 2);
        Collection ss = new ArrayList();
        ss.add(s1);
        ss.add(s2);
        Iterator it = ss.iterator();
        while (it.hasNext()) {
            System.out.println(it.next());
            ;
        }
    }
}

